function ListNode(val, next) {
    this.val = val;
    this.next = next ? next : null;
}
const head = new ListNode('a')

console.log(head.val);

// class LinkNode {
//     constructor(val, next) {
//         this.val = val;
//         this.next = next ? next : null;
//     }
// }

// let head = new LinkNode('a')
// console.log(head);